package com.zhong.gang.app.ui.message;

import android.app.Activity;

import com.zhong.gang.app.api.Api;
import com.zhong.gang.app.api.HttpUtils;
import com.zhong.gang.applib.http.callback.Callback;

public class MessagePresenter {

    public void getList(Activity activity,int current, Callback callback){
        HttpUtils.post(Api.getMessage,activity)
                .addParams("current",current+"")
                .addParams("size","10")
                .build().execute(callback);
    }

    /**
     * 标记为已读
     * @param activity
     * @param id
     * @param callback
     */
    public void setRead(Activity activity,int id, Callback callback){
        HttpUtils.post(Api.setRead,activity)
                .addParams("ids",id+"")
                .build().execute(callback);
    }
}
